'use strict';

app.factory("appShops", ["Search", function (Search) {
    var search = new Search();
    search.pagingUrl = "/api/search/shop";
    search.researchUrl = "/api/search/shop";
    return search;
} ]);

app.factory("appUsers", ["Search", function (Search) {
    var search = new Search();
    search.pagingUrl = "/api/search/user";
    search.researchUrl = "/api/search/user";
    return search;
} ]);

app.factory("appShopEditor", ["MultiData", "Shop", function (MultiData, Shop) {
    return new MultiData({
        request: {
            url: "/api/shop/full" /* key is append */
        },
        persistence: false,
        type: Shop
    });
} ]);

app.factory("appUserEditor", ["MultiData", "User", function (MultiData, User) {
    return new MultiData({
        request: {
            url: "/api/user/full" /* key is append */
        },
        persistence: false,
        type: User
    });
} ]);


